/* Storefront polish. The athletic black italic voice stays on chrome,
   prices and titles. Body copy, forms and catalogs stay readable. */

body {
    background: #f3f3f3;
    color: #141414;
    font-family: var(--font-body);
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
}

banner-block a.button.big {
    width: 240px;
    height: 60px;
    min-width: 0;
    max-width: 100%;
    padding: 0 28px;
    font-size: var(--font-size-lg);
}

h1,
h2,
h3,
button,
a.button,
header,
.mobile-menu,
.page-title,
section > h1,
section > .title,
.info .item-name,
.info .item-price {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 900;
}

p,
li,
td,
.item-services,
.item-code,
.item-in-stock,
main p,
.discount,
footer p,
footer .contact-info-block,
.input-group input,
.input-group textarea,
.input-group select,
.body {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 400;
}

section > h1,
section > .title,
h1.page-title {
    margin: 0;
    width: 100%;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-size: var(--font-size-4xl);
    text-align: center;
}

section > h2 {
    margin: 8px 0 0;
    font-size: var(--font-size-sm);
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0;
    text-align: center;
    opacity: 0.55;
}

.page-line,
section .line {
    width: 36px;
    height: 2px;
    margin: 16px auto 0;
    align-self: center;
    background: #141414;
    border: 0;
}

a.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 44px;
    padding: 0 22px;
    border-radius: 8px;
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    transition: background-color 0.15s ease, color 0.15s ease;
}

a.button:hover,
button:hover {
    opacity: 1;
}

a.button.big,
button.big {
    height: 52px;
    width: auto;
    max-width: 100%;
    min-width: min(180px, 100%);
    padding: 0 28px;
    font-size: var(--font-size-md);
}

.gallery {
    width: min(1160px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.gallery .slider button.dot,
.gallery .slider button.dot-active {
    position: relative;
    display: block;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    font-style: normal;
    letter-spacing: 0;
    line-height: 0;
    overflow: visible;
}
.gallery .slider button.dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c8c8c8;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.gallery .slider button.dot.is-active::before,
.gallery .slider button.dot-active::before {
    background: #141414;
}

#app-busy {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(20, 20, 20, 0.55);
    align-items: center;
    justify-content: center;
}

#app-busy.is-on {
    display: flex;
}

.app-busy-card {
    background: #fff;
    border-radius: 18px;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 220px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.app-busy-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #ececec;
    border-top-color: #141414;
    border-radius: 50%;
    animation: app-busy-spin 0.7s linear infinite;
}

.app-busy-text {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    font-style: normal;
    font-weight: 400;
    color: #141414;
}

@keyframes app-busy-spin {
    to { transform: rotate(360deg); }
}

.is-busy {
    pointer-events: none;
    opacity: 0.7;
}

#dialog-payment-failed div[slot=body],
#dialog-ordered div[slot=body],
#card-payment-ok div[slot=body] {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    gap: 12px;
}

#dialog-payment-failed img,
#dialog-ordered img,
#card-payment-ok img {
    width: 72px;
    height: 72px;
    margin: 0 0 8px;
}

#dialog-payment-failed h1,
#dialog-ordered h1,
#card-payment-ok h1 {
    font-size: var(--font-size-3xl);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0;
    max-width: 20ch;
}

#dialog-payment-failed p,
#dialog-ordered p,
#card-payment-ok p {
    font-family: var(--font-body);
    font-size: var(--font-size-md);
    font-weight: 400;
    font-style: normal;
    line-height: 1.5;
    text-align: center;
    opacity: 0.72;
    margin: 0;
    max-width: 32ch;
}

#dialog-payment-failed button.big,
#dialog-ordered button.big,
#card-payment-ok button.big {
    width: min(240px, 100%);
    margin-top: 16px;
    background: #141414;
    color: #fff;
    border: 1px solid #141414;
    border-radius: 12px;
}

a.button.edged {
    background-color: transparent;
    border-radius: 0;
    width: 240px;
    height: 60px;
    min-width: 0;
    max-width: calc(100% - 32px);
    padding: 0 32px;
}

form.form button.big,
.form button.big {
    width: 100%;
    min-width: 0;
}

.form a,
form.form a {
    display: inline;
    white-space: normal;
    text-wrap: wrap;
    line-height: 1.4;
    max-width: 100%;
}

.buy-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.buy-buttons-row .buy-buttons-column {
    display: flex;
    width: 100%;
    min-width: 0;
}

.buy-buttons-row .buy-button-decoration {
    flex: 1 1 auto;
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: 0 10px;
    white-space: nowrap;
    letter-spacing: 0.03em;
    font-size: var(--font-size-xs);
    line-height: 1;
}

.search-form button,
.mobile-menu button {
    height: auto;
    min-width: 0;
    padding: 0;
    white-space: nowrap;
}

.search-form button[type=submit] {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group label {
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: var(--font-size-2xs);
}

.input-group {
    width: 100%;
}

.input-group select,
.input-group input,
.input-group textarea {
    appearance: none;
    -webkit-appearance: none;
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 400;
    font-size: var(--font-size-sm);
    line-height: 1.3;
    height: 48px;
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    background: #fff;
    color: #141414;
    box-sizing: border-box;
    box-shadow: none;
}

.input-group select {
    padding-right: 36px;
}

.input-group textarea {
    height: auto;
    min-height: 120px;
    line-height: 1.45;
    padding: 12px 14px;
    resize: vertical;
}

.input-group select:focus,
.input-group input:focus,
.input-group textarea:focus {
    border-color: #141414;
}

section > .form,
form.form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    padding: 28px 28px 32px;
    margin: 28px 0 0;
    width: min(420px, calc(100% - 32px));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
}

form.form .input-group input,
form.form .input-group select,
form.form .input-group textarea {
    width: 100%;
    max-width: 100%;
}

nav {
    background: transparent;
    width: min(1160px, calc(100% - 32px));
    margin: 8px auto 0;
    padding: 0;
    color: #6d6d6d;
    font-style: normal;
}

nav > *,
nav > *:first-child {
    padding-left: 0;
    color: #6d6d6d;
    font-style: normal;
    font-weight: 500;
}

nav > *:last-child {
    color: #141414;
}

header .categories > a,
header .categories-menu > a {
    letter-spacing: 0.04em;
    font-size: var(--font-size-md);
}

.search-form input[type=search] {
    appearance: none;
    -webkit-appearance: none;
    max-width: 188px;
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 400;
    font-size: var(--font-size-sm);
    line-height: 1.3;
    color: #141414;
    padding: 0 14px;
    box-shadow: none;
}

header .search-form {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 36px;
    height: 36px;
    max-width: 280px;
    padding: 0;
}

/* One page shell. The header spacer already clears the fixed header,
   so a section only needs a short gap of its own. */
body > section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 28px;
    margin-bottom: 0;
}

body > section + section {
    margin-top: 36px;
}

body > section:last-of-type {
    margin-bottom: 72px;
}

body > section:has(banner-block) {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
}

body > section + section:has(banner-block) {
    margin-top: 36px;
}

body > section:has(section-line) {
    margin-bottom: 0;
}

body > section.goods-list {
    margin-top: 8px;
}

#product {
    margin-top: 8px;
}

section > main:has(product-item),
section > main:has(category-card),
.goods-list > div:first-child {
    width: min(1160px, calc(100% - 32px));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 20px;
    margin: 32px auto 56px;
}

section > main:has(category-card) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.goods-list > div:first-child {
    margin: 12px auto 28px;
}

section > main:has(product-item) > *,
section > main:has(category-card) > *,
.goods-list > div:first-child > * {
    min-width: 0;
    margin: 0;
}

.goods-list > div:first-child > * {
    display: flex;
    justify-content: center;
}

section > main:has(product-item) > product-item,
.goods-list product-item,
section > main:has(category-card) > category-card {
    width: 100%;
}

body > section > div:has(> aside) {
    display: flex;
    align-items: flex-start;
    width: min(1000px, 100%);
    margin-top: 28px;
}

body > section > div > aside {
    flex: 0 0 280px;
    width: 280px;
    border-right: 1px solid var(--medium-dark-color);
}

body > section > div:has(> aside) > main,
body > section > div:has(> aside) > form {
    flex: 1;
    min-width: 0;
    width: auto;
    max-width: 100%;
    padding-left: 28px;
}

#product .main-block {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    gap: 28px;
}

#product .preview {
    width: 100%;
    max-width: none;
    max-height: none;
    flex: none;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#product .preview > .product-preview-gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    flex: 0 0 112px;
    align-items: center;
    width: 100%;
    height: 112px;
    min-height: 112px;
    max-height: 112px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

#product .preview > .product-preview-gallery > img {
    flex: 0 0 100px;
    width: 100px;
    min-width: 100px;
    height: 100px;
}

#product .preview > .product-preview-img-container {
    position: relative;
    border: 0;
    border-radius: 18px;
    background: #fff;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    max-height: none;
    flex: none;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
}

#product .preview > .product-preview-img-container > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
}

#product .info {
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
    min-width: 0;
    width: 100%;
}

@media only screen and (min-width: 1001px) {
    #product .preview,
    #product .info {
        min-width: 0;
        max-width: none;
        max-height: none;
        align-self: start;
    }

    #product .preview {
        display: flex;
        flex-direction: column;
    }

    #product .preview > .product-preview-gallery {
        flex: 0 0 112px;
    }

    #product .info {
        display: flex;
        flex-direction: column;
    }
}

.info .item-name {
    font-size: var(--font-size-4xl);
    letter-spacing: -0.03em;
}

.info .item-services > * {
    padding: 9px 0;
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: var(--font-size-sm);
    line-height: 1.4;
}

.info .item-price {
    font-size: var(--font-size-4xl);
    letter-spacing: -0.03em;
}

.info .send-tomorrow {
    max-width: none;
    width: 100%;
    background: #f6f6f6;
}

#product > .item-text,
.comments {
    width: min(1160px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
}

.comments {
    margin-top: 20px;
    margin-bottom: 80px;
    padding: 28px 32px 32px;
}

.comments div:first-child label {
    font-style: italic;
    font-weight: 900;
    letter-spacing: -0.03em;
}

#product .buy-buttons-row .buy-button-decoration,
#product #add-to-cart,
#product #buy-in-click,
#product #buy-in-parts {
    height: 52px;
    min-height: 52px;
    box-sizing: border-box;
}

#product .amount-input-group {
    height: 52px;
    width: 100%;
    box-sizing: border-box;
}

#add-to-cart {
    background: #141414;
    color: #fff;
    border-color: #141414;
}

#add-to-cart:hover {
    background: #000;
    color: #fff;
}

.comments > div:first-child {
    justify-content: center;
    gap: 16px;
}

.comments > div:first-child:has(label) {
    justify-content: space-between;
}

#new-comment-dialog {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    min-width: 240px;
    padding: 0 28px;
    font-size: var(--font-size-sm);
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.04em;
    border-radius: 12px;
    border: 1px solid #141414;
    background: #141414;
    color: #fff;
}

footer {
    padding: 64px 0 28px;
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 400;
}

footer > div:first-child > .block-logo {
    max-width: 420px;
}

footer .block-logo p {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    line-height: 1.65;
    font-weight: 400;
    font-style: normal;
    opacity: 0.78;
    max-width: 400px;
    margin: 16px 0 0;
}

footer .contact-info-block > div > span:first-child {
    letter-spacing: 0.08em;
    font-size: var(--font-size-xs);
    font-weight: 400;
    font-style: normal;
    opacity: 0.55;
}

footer .contact-info-block > div > span:not(:first-child) {
    text-transform: none;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    font-weight: 400;
    font-style: normal;
    opacity: 0.92;
    letter-spacing: 0;
    line-height: 1.4;
}

footer > div:last-child {
    margin-top: 28px;
    font-size: var(--font-size-xs);
    font-weight: 400;
    font-style: normal;
    opacity: 0.65;
    gap: 12px;
}

footer > div:last-child a {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
}

.body {
    /* Match the product description card: same width, padding, type. */
    margin: 32px auto 80px;
    width: min(1160px, calc(100% - 48px));
    max-width: 1160px;
    font-family: var(--font-display);
    font-weight: 400;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 18px;
    padding: 28px 32px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
    overflow-wrap: break-word;
    overflow-x: auto;
}

.body h1,
.body h2,
.body h3,
.body h4 {
    font-style: italic;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #141414;
}

.body h1 {
    font-size: var(--font-size-3xl);
    margin: 0 0 16px;
}

.body h2 {
    font-size: var(--font-size-xl);
    margin: 28px 0 10px;
}

.body h3 {
    font-size: var(--font-size-lg);
    margin: 22px 0 8px;
}

.body h4 {
    font-size: var(--font-size-md);
    margin: 18px 0 8px;
}

.body p,
.body li,
.privacy p {
    font-size: var(--font-size-sm);
    line-height: 1.55;
    font-weight: 400;
}

.body p {
    text-align: left;
    margin: 0 0 12px;
}

.body a {
    display: inline;
    white-space: normal;
    text-wrap: wrap;
    color: #141414;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.body iframe,
.body table {
    max-width: 100%;
}

.body img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    margin: 16px auto;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
}

.body ul,
.body ol {
    margin: 4px 0 18px;
    padding: 0;
    list-style: none;
}

.body li {
    position: relative;
    margin: 0;
    padding: 5px 0 5px 22px;
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.body ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    width: 10px;
    height: 2px;
    background: #141414;
}

.body ol {
    counter-reset: product-copy;
}

.body ol > li {
    counter-increment: product-copy;
    padding-left: 28px;
}

.body ol > li::before {
    content: counter(product-copy);
    position: absolute;
    left: 0;
    top: 7px;
    font-weight: 700;
    font-size: var(--font-size-sm);
}

.body .product-table {
    width: 100%;
    overflow-x: auto;
    margin: 8px 0 22px;
    border: 1px solid #ececec;
    border-radius: 12px;
}

.body table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.body th,
.body td {
    min-width: 0;
    padding: 12px 14px;
    text-align: left;
    font-size: var(--font-size-sm);
    line-height: 1.4;
    border-bottom: 1px solid #eee;
}

.body th {
    background: #141414;
    color: #fff;
    font-weight: 600;
    opacity: 1;
    letter-spacing: 0.03em;
}

.body tr:last-child td {
    border-bottom: 0;
}

.body img[hidden] {
    display: none;
}

body > section > div > aside .side-item {
    color: var(--dark-color);
    height: 44px;
    font-size: var(--font-size-sm);
    font-style: normal;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    text-decoration: none;
}

body > section > div > aside .side-item:hover {
    cursor: pointer;
    background: #f0f0f0;
    color: #141414;
}

body > section > div > aside .side-item.active,
body > section > div > aside .side-item.active:hover {
    padding: 0 14px;
    background: #141414;
    color: #fff;
    border-left: 0;
}

body > section > div:has(> aside) > form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: none;
    min-width: 0;
    width: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0;
    gap: 0;
}

body > section > div:has(> aside) > form h1,
body > section > div:has(> aside) > main > h1 + div .billing-address > h1,
body > section > div:has(> aside) > main > h1 {
    font-size: var(--font-size-md);
    font-style: italic;
    font-weight: 900;
}

body > section > div:has(> aside) > main > h1:first-child {
    font-size: var(--font-size-xs);
    font-style: normal;
    font-weight: 500;
    opacity: 0.5;
    margin: 0 0 16px;
}

body > section > div:has(> aside) .account-card,
body > section > div:has(> aside) .address-block {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 8px 24px 20px;
    box-sizing: border-box;
    box-shadow: none;
}

body > section > div:has(> aside) > main:has(> .input-group) {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: none;
}

body > section > div:has(> aside) .account-card .input-group,
body > section > div:has(> aside) > main:has(> .input-group) .input-group {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    width: 100%;
}

body > section > div:has(> aside) .account-card .input-group label,
body > section > div:has(> aside) > main:has(> .input-group) .input-group label {
    width: auto;
    flex: 0 1 150px;
    min-width: 0;
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
    white-space: normal;
}

body > section > div:has(> aside) .account-card .input-group input,
body > section > div:has(> aside) .account-card .input-group select,
body > section > div:has(> aside) > main:has(> .input-group) .input-group input,
body > section > div:has(> aside) > main:has(> .input-group) .input-group select {
    flex: 1 1 220px;
    width: auto;
    min-width: 0;
    max-width: 100%;
    height: 36px;
    margin-top: 0;
    font-size: var(--font-size-xs);
    font-weight: 400;
    line-height: 1.3;
    padding: 8px 12px;
    appearance: none;
    -webkit-appearance: none;
}

body > section > div:has(> aside) .account-card button.big,
body > section > div:has(> aside) .account-card a.button.big,
body > section > div:has(> aside) .button-row .button,
body > section > div:has(> aside) .button-block a.button.big {
    width: 160px;
    height: 44px;
    font-size: var(--font-size-xs);
    margin: 20px auto 4px;
}

body > section > div:has(> aside) > main {
    min-width: 0;
    width: 100%;
}

body > section > div:has(> aside) table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #ececec;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
}

body > section > div:has(> aside) thead th {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.55;
    padding: 14px 16px;
    background: #fafafa;
    white-space: nowrap;
    min-width: 0;
}

body > section > div:has(> aside) tbody td {
    padding: 16px;
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 400;
    font-size: var(--font-size-sm);
    line-height: 1.35;
    border-bottom: 1px solid #f0f0f0;
    min-width: 0;
    vertical-align: middle;
}

body > section > div:has(> aside) tbody td.bold,
body > section > div:has(> aside) tbody td.price {
    font-family: var(--font-display);
    font-weight: 900;
    font-style: italic;
}

body > section > div:has(> aside) table .item-title,
body > section > div:has(> aside) table td div label {
    font-family: var(--font-body);
    font-style: normal;
    font-weight: 400;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

body > section > div:has(> aside) tbody tr:last-child td {
    border-bottom: 0;
}

body > section > div:has(> aside) td a.button {
    display: inline-flex;
    text-decoration: none;
    width: auto;
    min-width: 110px;
    height: 36px;
    padding: 0 14px;
    font-size: var(--font-size-2xs);
    white-space: nowrap;
}

.cart-details,
.shipping-details {
    background: #fff;
    border-radius: 16px;
    padding: 8px 20px;
}

.shipping-details {
    padding: 20px 24px 8px;
    border-bottom: 0;
}

html.gallery-open,
html.menu-open {
    overflow: hidden;
    overscroll-behavior: none;
    height: 100%;
}

body.gallery-open,
body.menu-open {
    overflow: hidden;
    overscroll-behavior: none;
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
}

@media only screen and (max-width: 1000px) {
    #product .main-block {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        width: min(1160px, calc(100% - 32px));
    }

    #product .preview > .product-preview-img-container {
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media only screen and (max-width: 1300px) {
    #product .info .item-name,
    #product .info .item-code,
    #product .info .item-in-stock,
    #product .info .item-price {
        display: block;
        text-align: left;
    }

    #product .info .item-rating {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 2px;
    }

    #product .info .item-rating .star {
        flex: 0 0 16px;
        width: 16px;
        height: 16px;
        display: block;
        background-size: contain;
    }

    #product .info .item-price span {
        display: inline;
        margin-left: 8px;
    }
}

@media only screen and (max-width: 800px) {
    section > h1,
    section > .title,
    h1.page-title {
        font-size: var(--font-size-3xl);
    }

    .body h1 {
        font-size: var(--font-size-2xl);
    }

    #product .info .send-tomorrow {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        gap: 14px;
        padding: 16px;
    }

    #product .info .send-tomorrow .tomorrow-text > div:first-child {
        font-size: var(--font-size-lg);
    }

    #product .info .send-tomorrow .tomorrow-text > div:last-child {
        font-size: var(--font-size-sm);
    }

    #product .info .send-tomorrow .tomorrow-counter {
        justify-content: space-between;
        width: 100%;
    }

    #product .info .send-tomorrow .tomorrow-counter > * {
        width: 72px;
        height: 72px;
        border-radius: 12px;
    }

    #product .info .send-tomorrow .tomorrow-counter > * > div:first-child {
        font-size: var(--font-size-3xl);
    }

    #product .info .send-tomorrow .tomorrow-counter > * > div:last-child {
        font-size: var(--font-size-xs);
    }

    #product .info .item-rating .star {
        flex: 0 0 28px;
        width: 28px;
        height: 28px;
        background-size: contain;
    }

    #product .preview > .product-preview-img-container {
        min-height: 0;
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
    }

    .buy-buttons-row,
    .buy-buttons-row:has(#buy-in-click) {
        grid-template-columns: 1fr 1fr;
    }

    #product .buy-buttons-row .buy-button-decoration {
        font-size: var(--font-size-xs);
        padding: 0 8px;
        letter-spacing: 0.02em;
    }

    .comments > div:first-child,
    .comments > div:first-child:has(label) {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    #new-comment-dialog {
        width: min(280px, 100%);
        margin: 0 auto;
    }

    #product {
        padding: 0 4px;
    }

    #product .main-block,
    #product > .item-text,
    #product .comments,
    .body {
        width: 100%;
        max-width: 100%;
    }

    #product .info,
    #product > .item-text,
    .comments,
    .body {
        padding: 12px 8px;
    }

    .info .item-name,
    #product .info .item-name {
        display: block;
        font-size: var(--font-size-2xl);
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    #product .info,
    #product .preview {
        min-width: 0;
        max-width: 100%;
        overflow: visible;
        max-height: none;
    }

    #product .preview > .product-preview-gallery {
        flex: 0 0 112px;
        min-height: 112px;
        height: 112px;
    }

    .cart-details,
    .shipping-details {
        padding-left: 8px;
        padding-right: 8px;
    }
}

@media only screen and (max-width: 980px) {
    section > main:has(product-item),
    .goods-list > div:first-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 700px) {
    section > main:has(category-card) {
        grid-template-columns: 1fr;
    }

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body > section {
        max-width: 100%;
        overflow-x: clip;
        align-items: center;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    body > section#product {
        overflow: visible;
    }

    body > section > * {
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .cart-details,
    .cart-details-mobile,
    .shipping-details,
    .cart-total,
    .main-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: visible;
    }

    .shipping-details,
    .cart-total {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .shipping-details > *,
    .shipping-details #total-value,
    .cart-total,
    .cart-total span,
    .cart-total .cart-total-label,
    .cart-total .cart-total-value {
        font-size: var(--font-size-md);
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .shipping-details #total-value,
    .cart-total .cart-total-value {
        text-align: right;
        justify-self: end;
    }
}

@media only screen and (max-width: 900px) {
    footer > div:first-child {
        align-items: center;
        text-align: center;
    }

    footer .block-logo,
    footer > div:first-child > * {
        align-items: center;
        max-width: 100%;
    }

    footer .block-logo p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    footer > div:first-child > div:nth-child(2) {
        width: min(280px, 100%);
        max-width: 100%;
        margin: 0 auto;
        align-items: stretch;
        text-align: left;
    }

    footer .contact-info-block {
        justify-content: flex-start;
        align-items: flex-start;
        width: 100%;
        margin: 0 0 20px;
        text-align: left;
    }
}

@media only screen and (max-width: 600px) {
    body > section > div > aside {
        display: none;
    }

    body > section > div:has(> aside) {
        width: 100%;
    }

    body > section > div:has(> aside) > main,
    body > section > div:has(> aside) > form {
        padding-left: 0;
    }

    body > section > div:has(> aside) .account-card,
    body > section > div:has(> aside) .address-block,
    body > section > div:has(> aside) > main:has(> .input-group) {
        max-width: 100%;
    }

    body > section > div:has(> aside) .account-card .input-group,
    body > section > div:has(> aside) > main:has(> .input-group) .input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    body > section > div:has(> aside) .account-card .input-group label,
    body > section > div:has(> aside) > main:has(> .input-group) .input-group label {
        flex: 0 0 auto;
        width: 100%;
    }

    body > section > div:has(> aside) .account-card .input-group input,
    body > section > div:has(> aside) > main:has(> .input-group) .input-group input {
        flex: 1 1 auto;
        width: 100%;
    }

    footer {
        padding: 40px 0 28px;
        text-align: center;
    }

    footer > div:first-child {
        align-items: center;
        padding-bottom: 32px;
        gap: 28px;
        text-align: center;
    }

    footer .block-logo,
    footer > div:first-child > * {
        align-items: center;
        max-width: 100%;
        width: 100%;
    }

    footer .block-logo img {
        margin: 0 auto 8px;
    }

    footer .block-logo p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        font-size: var(--font-size-sm);
        line-height: 1.6;
        max-width: 320px;
    }

    footer > div:first-child > div:nth-child(2) {
        width: min(280px, 100%);
        max-width: 100%;
        margin: 0 auto;
        align-items: stretch;
        text-align: left;
    }

    footer .contact-info-block {
        justify-content: flex-start;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
        margin: 0 0 20px;
        text-align: left;
    }

    footer .contact-info-block > img {
        flex: 0 0 32px;
        margin-top: 2px;
    }

    footer .contact-info-block > div {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: none;
        text-align: left;
    }

    footer .contact-info-block > div > span:first-child {
        font-size: var(--font-size-xs);
        letter-spacing: 0.08em;
    }

    footer .contact-info-block > div > span:not(:first-child) {
        font-size: var(--font-size-md);
        line-height: 1.4;
    }

    footer > div:last-child {
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 20px;
        font-size: var(--font-size-xs);
        line-height: 1.45;
        opacity: 0.7;
    }

    footer > div:last-child > * {
        text-align: center;
        padding: 2px 0;
        font-size: var(--font-size-xs);
        width: auto;
        max-width: 100%;
    }

    footer > div:last-child a {
        font-size: var(--font-size-xs);
        display: inline-flex;
        padding: 8px 0;
    }
}
